package de.fzi.fhemapi;

import org.mortbay.jetty.Server;
import org.mortbay.jetty.webapp.WebAppContext;

public class FhemAPI {
	   private static String contextPath = "/HW";
	    private static String resourceBase = "WebContent";
	    private static int httpPort = 80;

	    public static void main(String[] args) throws Exception {
	        Server server = new Server(httpPort);
	        WebAppContext webapp = new WebAppContext();
	        webapp.setContextPath(contextPath);
	        webapp.setResourceBase(resourceBase);
	        webapp.setClassLoader(Thread.currentThread().getContextClassLoader());
	        server.setHandler(webapp);
	        server.start();
	        server.join();
	        System.out.println("Started Jetty " + Server.getVersion()
	                + ", go to http://localhost:" + httpPort + contextPath);
	        
	        
	    }

}
